package week2;

import edu.princeton.cs.algs4.StdIn;

/**
 * Created by dyc on 2016/11/17.
 */
public class QueueTestClient {
    public static void main(String[] args){
        AbstractQueue<String> queue = new ArrayQueue<>();
        while (!StdIn.isEmpty()){
            String string = StdIn.readString();
            if (string.equals("-")){
                while (!queue.isEmpty())
                    System.out.println(queue.dequeue() + " ");
                break;
            }
            else
                queue.enqueue(string);
        }
    }
}
